import { createSlice } from '@reduxjs/toolkit';
const initialState = {
  collapsed: false,
  menuOpenKeys: []
};

const appSlice = createSlice({
  name: 'menu',
  initialState,
  reducers: {
    setCollapsed: (state, action) => {
      state.collapsed = action.payload;
    },
    setMenuOpenKeys: (state, action) => {
      state.menuOpenKeys = action.payload;
    },
  },
});

export const { setCollapsed, setMenuOpenKeys } = appSlice.actions;

export default appSlice.reducer;